<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This file documents the use of the GNU compilers.

Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Long Long (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="Long Long (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="Long Long (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Indices.html" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="C-Extensions.html" rel="up" title="C Extensions">
<link href="Complex.html" rel="next" title="Complex">
<link href="_005f_005fint128.html" rel="prev" title="__int128">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en_US">
<div class="section-level-extent" id="Long-Long">
<div class="nav-panel">
<p>
Next: <a href="Complex.html" accesskey="n" rel="next">Complex Numbers</a>, Previous: <a href="_005f_005fint128.html" accesskey="p" rel="prev">128-bit Integers</a>, Up: <a href="C-Extensions.html" accesskey="u" rel="up">Extensions to the C Language Family</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="Double_002dWord-Integers"><span>6.10 Double-Word Integers<a class="copiable-link" href="#Double_002dWord-Integers"> &para;</a></span></h3>
<a class="index-entry-id" id="index-long-long-data-types"></a>
<a class="index-entry-id" id="index-double_002dword-arithmetic"></a>
<a class="index-entry-id" id="index-multiprecision-arithmetic"></a>
<a class="index-entry-id" id="index-LL-integer-suffix"></a>
<a class="index-entry-id" id="index-ULL-integer-suffix"></a>

<p>ISO C99 and ISO C++11 support data types for integers that are at least
64 bits wide, and as an extension GCC supports them in C90 and C++98 modes.
Simply write <code class="code">long long int</code> for a signed integer, or
<code class="code">unsigned long long int</code> for an unsigned integer.  To make an
integer constant of type <code class="code">long long int</code>, add the suffix &lsquo;<samp class="samp">LL</samp>&rsquo;
to the integer.  To make an integer constant of type <code class="code">unsigned long
long int</code>, add the suffix &lsquo;<samp class="samp">ULL</samp>&rsquo; to the integer.
</p>
<p>You can use these types in arithmetic like any other integer types.
Addition, subtraction, and bitwise boolean operations on these types
are open-coded on all types of machines.  Multiplication is open-coded
if the machine supports a fullword-to-doubleword widening multiply
instruction.  Division and shifts are open-coded only on machines that
provide special support.  The operations that are not open-coded use
special library routines that come with GCC.
</p>
<p>There may be pitfalls when you use <code class="code">long long</code> types for function
arguments without function prototypes.  If a function
expects type <code class="code">int</code> for its argument, and you pass a value of type
<code class="code">long long int</code>, confusion results because the caller and the
subroutine disagree about the number of bytes for the argument.
Likewise, if the function expects <code class="code">long long int</code> and you pass
<code class="code">int</code>.  The best way to avoid such problems is to use prototypes.
</p>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Complex.html">Complex Numbers</a>, Previous: <a href="_005f_005fint128.html">128-bit Integers</a>, Up: <a href="C-Extensions.html">Extensions to the C Language Family</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
